import {formatTime} from '../../../utils/util.js'
// pages/change/my-check-table/index.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        page: {
            start: 1,
            size: 1000
        },
        list: []
    },

    onLoad: function () {
        wx.$ajax.getCheckList(this.data.page, {isToken: true})
            .then(({data: {data, msg, status}, header, statusCode, errMsg}) => {
                if (status === '0') {
                    let list = data.list || [];
                    list.map(item=>{
                        console.log(item.created);
                        item.created = formatTime(new Date(+(item.created+ '000')));
                    })
                    this.setData({
                        list
                    })
                    console.log(this.data.list);
                } else {
                    console.log('请求失败');
                }
            })

    },
   // 没用 测试
    time() {
        return 123123
    }

})